package org.pizza.dlock.autoconfigure;

import org.pizza.dlock.distributed.lock.advisor.DistributedLockAnnotationAdvisor;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.boot.autoconfigure.task.TaskSchedulingAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * @author 高巍
 * @date 2020-01-31 4:56 下午
 */
@Configuration(proxyBeanMethods = false)
@AutoConfigureAfter({RedisAutoConfiguration.class, TaskSchedulingAutoConfiguration.class})
@Import({ZookeeperLockAutoConfiguration.class, RedissionLockAutoConfiguration.class})
public class DistributedLockAutoConfiguration {

    @Bean
    public DistributedLockAnnotationAdvisor distributedLockAnnotationAdvisor() {
        return new DistributedLockAnnotationAdvisor();
    }

}
